/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package intershopxssscanner.parsers;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Willem
 */
public class FileParser {

    public FileParser() {
        
    }
    
    public ArrayList<String> parseISMLFile(File f){
        ArrayList sb = new ArrayList();
        BufferedReader breader = null;
        try {
            breader = new BufferedReader(new FileReader(f));
            
            String line;
            while((line = breader.readLine())!=null){
                //System.out.println(line);
                sb.add(line);
            }
            
        } catch (IOException ex) {
            Logger.getLogger(FileParser.class.getName()).log(Level.SEVERE, null, ex);
        } finally {
            try {
                breader.close();
            } catch (IOException ex) {
                Logger.getLogger(FileParser.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        return sb;
    }
    
}
